<%@ page language="java" contentType="text/html; charset=UTF-8"
    pageEncoding="UTF-8"%>
<%@ include file="/common/taglibs.jsp" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title><s:text name="admin.discount.list.title"/></title>
<script type="text/javascript" src="${ctx}/js/jquery-1.4.3.min.js"></script>
</head>
<body>
<div>
	<table>
		<tr><th>discount number</th><th>amount</th><th>startdate</th><th>expiredate</th><th colspan="2">operation</th></tr>
		<s:iterator value="discounts.data">
		<tr>  
           	<td><s:property value="discountNo"/></td>  
           	<td><s:property value="amount"/></td>  
           	<td><s:property value="startDate"/></td>  
           	<td><s:property value="expireDate"/></td>
           	<td><s:a href="edit.action?id=%{id}">edit</s:a></td>  
           	<td><s:a href="delete.action?id=%{id}">delete</s:a></td>    
        </tr>  
		</s:iterator>
	</table>
</div>
<s:url id="url_pre" value="list.action">
	<s:param name="page" value="page-1"></s:param>
</s:url>

<s:url id="url_next" value="list.action">
	<s:param name="page" value="page+1"></s:param>
</s:url>
<div>
	<div>
		<s:if test="discounts.previous">
			<s:a href="%{url_pre}">pre</s:a>
		</s:if>
		<s:else>
			pre
		</s:else>
	</div>		
	<div><s:property value="page"/></div>
	<div>
		<s:if test="discounts.next">
			<s:a href="%{url_next}">next</s:a>
		</s:if>
		<s:else>
			next
		</s:else>
	</div>
</div>
</body>
</html>